package com.myioc.service.impl;

import com.myioc.myAnnotation.MyAtn;
import com.myioc.myAnnotation.MyRes;
import com.myioc.service.OrderService;
import com.myioc.service.UserService;

import javax.annotation.Resource;

//将该类注入到spring容器里面
@MyAtn
public class UserServiceImpl implements UserService {
	// 从Spring容器中读取bean
	@MyRes
	private OrderService orderServiceImpl;

	public void add() {
		orderServiceImpl.addOrder();
		System.out.println("我是使用反射机制运行的方法");
	}

}
